[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-23 Thread Hamid,Idris
slow-downers So far \setcharacterstripping[1] is giving the right results. If the relevant trackers are available, could add them to the attached test. But presumably you know how and why it works even for a non-dimensionless glyph. so you want to see soem zwj sumbol in a rendered text? Onl

[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-22 Thread Hans Hagen via ntg-context
wiping. We can of course ignore in the backend when zero width but then how to explain that they contributed to the ht/dp (unless we wipe these dimensions) ... all slow-downers so you want to see soem zwj sumbol in a rendered text? Only in verbatim/\type'd text where it is appropriate, eve

[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-22 Thread Hamid,Idris
so you want to see soem zwj sumbol in a rendered text? Only in verbatim/\type'd text where it is appropriate, even necessary. Thanks to Word/WYSIWYG, the rule is de facto, but it is not de jure -) Ideally, Scintilla (Scite, Notepad++, etc.) should do the same, or provide a toggle, as

[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-22 Thread Hamid,Idris
r own visualization (consistent across fonts) and even then it would add some mess because we're talking of a mix of characters that can have gone (as part of rendering) or are not characters at all but spacing so, in that case only 'verbatim' is a candidate for visualization, not so much typeset text Hm

[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-22 Thread Hans Hagen via ntg-context
visualization (consistent across fonts) and even then it would add some mess because we're talking of a mix of characters that can have gone (as part of rendering) or are not characters at all but spacing so, in that case only 'verbatim' is a candidate for visualization, not so much typeset te

[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-21 Thread Hamid,Idris
in the font? 3. Ideally: a. we want all Unicode control symbols to show up in verbatim or in \typebuffer (as in a text editor); b. we want all Unicode control symbols to be suppressed in final pdf output (for, e.g., printing). But some fonts meant for printing have symbols for Unicode control c

[NTG-context] Re: Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2023-09-18 Thread vm via ntg-context
On 18/09/2023 17:07, Michael Loescher wrote: \starttext \type{hello} \stoptext here too (linux pop!os 22.04) something goes unexpected: ! Control sequence expected instead of undefined. \buff_verbatim_type_normal ...chained \t!verbatim \currenttype \??type \clf_type data

[NTG-context] Re: Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2023-09-18 Thread Mikael Sundqvist
gt; tex error on line 2 in file Z:/test.tex: Control sequence > expected instead of undefined > > \buff_verbatim_type_normal > #1->\buff_verbatim_initialize_type_two \dostarttaggedchained \t!verbatim > \currenttype \??type \clf_type data{\protecteddetokenize > {#1}}tab{\

[NTG-context] Re: Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2023-09-18 Thread Michael Loescher
pe_two \dostarttaggedchained \t!verbatim \currenttype \??type \clf_type data{\protecteddetokenize {#1}}tab{\typeparameter \c!tab }method{\p_buff_option }compact{\typeparameter \c!compact }escape{\typeparameter \c!escap \type{hello} 1 \starttext 2 >> \type{hello} 3 \stoptext

[NTG-context] Re: Framed Text with Chapter Numbers as Counter

2023-09-17 Thread Wolfgang Schuster
Jeroen schrieb am 16.09.2023 um 22:28: This MWE has a framed text for some verbatim text (code) with as title ref. a counter 1, 2, etc.. Is there a way to change this frame text title as following with the chapter number and a sequential number and the title. Code Fragment 1.1 (The First

[NTG-context] Re: Framed Text with Chapter Numbers as Counter

2023-09-17 Thread Jeroen
ence={tit1}] Some verbatim text \stopCode \startCode [title={The Second Title}, reference={tit2}] Some verbatim text \stopCode Refer to \in{code fragment}[tit1] bla \stopchapter \startchapter [title=second] \startCode [title={The Third Title}, reference={tit3}] Some verbatim text

[NTG-context] Re: Framed Text with Chapter Numbers as Counter

2023-09-17 Thread Bruce Horrocks
> On 16 Sep 2023, at 21:28, Jeroen wrote: > > This MWE has a framed text for some verbatim text (code) with as title ref. a > counter 1, 2, etc.. Is there a way to change this frame text title as > following with the chapter number and a sequential number and th

[NTG-context] Framed Text with Chapter Numbers as Counter

2023-09-16 Thread Jeroen
This MWE has a framed text for some verbatim text (code) with as title ref. a counter 1, 2, etc.. Is there a way to change this frame text title as following with the chapter number and a sequential number and the title. Code Fragment 1.1 (The First Title) Code Fragment 1.2 (The Second Title

[NTG-context] Verbatim Textbox with Reference NUmbering

2023-09-09 Thread Jeroen
This is a longshot, but would be great to have. Below I have at MWE1 the verbatim codefragment textbox I am using. I found in the forum MWE2 which is a textbox with an automatic reference number. Is there a way to get the same for MWE1 with automatic reference numbering like 1.1, 1.2 etc

[NTG-context] Re: Text runs out of Verbatim Frame

2023-09-08 Thread Wolfgang Schuster
Jeroen schrieb am 08.09.2023 um 13:09: I am using the following to print some verbatim text in a frame. At the right side, it keeps running out of the frame, is there a way to prevent this with the MWE? This verbatim frame always is textwidth, is there a way for a single frame just

[NTG-context] Text runs out of Verbatim Frame

2023-09-08 Thread Jeroen
I am using the following to print some verbatim text in a frame. At the right side, it keeps running out of the frame, is there a way to prevent this with the MWE? This verbatim frame always is textwidth, is there a way for a single frame just for if the situation asks for it to have it only have

[NTG-context] Re: how to define an environment with key=value arguments

2023-09-08 Thread Wolfgang Schuster
s = {"hash",}, actions   = function(h, a)     -- …     end, } \stopluacode But I didn’t find how to do environments. When you just need an environment with a optional argument to pass user values you can use the userdata environment but be aware that you have some limitat

[NTG-context] Re: # verbatim typesetting

2023-09-07 Thread Marcus Vinicius Mesquita
Dear Hans, Thank you for your detailed answer. I'll wait then the next upload. Kind regards Marcus Vinicius On Thu, Sep 7, 2023 at 2:36 PM Hans Hagen via ntg-context wrote: > > On 9/7/2023 2:47 PM, Marcus Vinicius Mesquita wrote: > > Dear List, > > > > The MWE below gives a pdf with two #'s

[NTG-context] Re: # verbatim typesetting

2023-09-07 Thread Hans Hagen via ntg-context
On 9/7/2023 2:47 PM, Marcus Vinicius Mesquita wrote: Dear List, The MWE below gives a pdf with two #'s instead of only one. Why is that? \starttext \startluacode context.type("#") \stopluacode \stoptext because by default tex loves to duplicate hashes when it serializes token lists

[NTG-context] # verbatim typesetting

2023-09-07 Thread Marcus Vinicius Mesquita
Dear List, The MWE below gives a pdf with two #'s instead of only one. Why is that? \starttext \startluacode context.type("#") \stopluacode \stoptext -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do

[NTG-context] Re: breakpoints in verbatim text

2023-08-18 Thread Hans Hagen
of the \everyinitializeverbatim register because it is used for inline and display verbatim. A better place to add the option is \buff_verbatim_initialize_typing_two for \starttyping and \buff_verbatim_initialize_type_two for \type. ok

[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Wolfgang Schuster
Alex Leray schrieb am 17.08.2023 um 17:59: Hi, I think I need to use verbatim because I'm typesetting source code and I need it to be as verbatim as possible. For the moment, I'm manually inserting zero-width spaces... seems to do the trick, although it's becoming unreadable :P Which

[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Alex Leray
Hi, I think I need to use verbatim because I'm typesetting source code and I need it to be as verbatim as possible. For the moment, I'm manually inserting zero-width spaces... seems to do the trick, although it's becoming unreadable :P Thanks, Alex Le 17/08/23 à 17:22, Wolfgang Schuster

[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Wolfgang Schuster
Alex Leray schrieb am 17.08.2023 um 14:41: Hi, I'd like to break lines in verbatim on certain characters like "/". I can do it for normal texte, but not inside typing environment. Do you need the verbatim environment or is the lines-environment sufficient. \setuppa

[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Alex Leray
, Alex Leray wrote: Hi, I'd like to break lines in verbatim on certain characters like "/". I can do it for normal texte, but not inside typing environment. Is there a way to achieve this? For now do this:   \appendtoks \usesetupsparameter\typingparameter   \to \everyinitiali

[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Hans Hagen
On 8/17/2023 2:41 PM, Alex Leray wrote: Hi, I'd like to break lines in verbatim on certain characters like "/". I can do it for normal texte, but not inside typing environment. Is there a way to achieve this? For now do this: \appendtoks \usesetupsparameter\typin

[NTG-context] breakpoints in verbatim text

2023-08-17 Thread Alex Leray
Hi, I'd like to break lines in verbatim on certain characters like "/". I can do it for normal texte, but not inside typing environment. Is there a way to achieve this? Below is my test code. Thanks, Alex * * * \setuppapersize[A7] \setbreakpoints[compound] \starttext 1. This is

[NTG-context] Re: new align option

2023-08-16 Thread Hraban Ramm
explain? Hraban Am 15.08.23 um 22:31 schrieb Hans Hagen via ntg-context: Hi, Especially for long verbatim lines we now can do this: \starttext \setupalign[hangright] \starttyping test test test test test test test test test test test test test test test test test test test test test test

[NTG-context] new align option

2023-08-15 Thread Hans Hagen via ntg-context
Hi, Especially for long verbatim lines we now can do this: \starttext \setupalign[hangright] \starttyping test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test

[NTG-context] Re: Using

2023-08-05 Thread Alex Leray
nce \strc_sectioning_initialize_increment ->\edef \currentheadincrement verbatim is tricky because it changes the catcodes here is a trick: \definehead   [poem]   [section] \setuphead   [poem]   [after=\startlines\tt,    % after the head is placed    aftersection=\stoplines] % when we end this section \startpoem

[NTG-context] Re: Using

2023-08-04 Thread Hans Hagen
ipsum dolor sit amet consectetur. \stoppoem \stoptext ``` I get the following traceback: ``` tex error   > tex error on line 6 in file /home/ali/work/being_human/test.tex: ! Undefined control sequence \strc_sectioning_initialize_increment ->\edef \currentheadincrement verbatim is

Re: [NTG-context] right and left arrowfill

2023-06-23 Thread Hans Hagen via ntg-context
dering; these fillers in text are sort of special Then again, the only way to resemble what TeX does is by re/defining and copied verbatim from The TeXbook both rightarrowfill and leftarrowfill and hope for the best and unlike with TeX in which an \hbox to 1in{\vrule \rightarrowfill \ 1cm \lef

Re: [NTG-context] right and left arrowfill

2023-06-23 Thread Carlos via ntg-context
the \rightarrowfill or \leftarrowfill? > > > > I mean. Once you get the glues messed up, the whole box crumbles. > > I'm not sure how you can mess up glue so that the box is no longer a box. > Boxes remain boxes. I guess that's the same mentality behind a fixed glue in LMT

Re: [NTG-context] Inline framed verbatim text

2023-05-19 Thread Aditya Mahajan via ntg-context
On Fri, 19 May 2023, Jeroen via ntg-context wrote: > Many thanks. Is there a proper way to add some space (a couple of pt or em) > to the left and the right of the text itself so the frame does not get so > close to the text? \framed[loffset=0.2ex, roffset=0.2ex]{...} Also see:

Re: [NTG-context] Inline framed verbatim text

2023-05-19 Thread Jeroen via ntg-context
chrieb am 19.05.2023 um 14:22: > > In order to get some inline framed verbatim text, I have in the past > > always used the following: > > > > \starttext > > > > This is an > > \inframed > > [frame=on, > > corner=00, > > radius=2mm,of

Re: [NTG-context] Inline framed verbatim text

2023-05-19 Thread Wolfgang Schuster via ntg-context
Jeroen via ntg-context schrieb am 19.05.2023 um 14:22: In order to get some inline framed verbatim text, I have in the past always used the following: \starttext This is an \inframed   [frame=on,   corner=00, radius=2mm,offset=-1.5pt]   {\ttx \bf example} \stoptext Since this has come-up

[NTG-context] Inline framed verbatim text

2023-05-19 Thread Jeroen via ntg-context
In order to get some inline framed verbatim text, I have in the past always used the following: \starttext This is an \inframed [frame=on, corner=00, radius=2mm,offset=-1.5pt] {\ttx \bf example} \stoptext Since this has come-up more and more often, I created the following: \define[1

Re: [NTG-context] Bug in verbatim wrapping examples on wiki

2023-02-15 Thread Pablo Rodriguez via ntg-context
On 2/4/23 07:49, Hugo Landau via ntg-context wrote: > On this page of the wiki there is an example for wrapping long words, > like long hexadecimal strings: > > https://wiki.contextgarden.net/Wrapping > > This example is buggy because it deletes one character at the point that > it is wrapped.

Re: [NTG-context] Bug in verbatim wrapping examples on wiki

2023-02-06 Thread Hans Hagen via ntg-context
On 2/5/2023 4:52 PM, Pablo Rodriguez via ntg-context wrote: On 2/5/23 13:13, Hans Hagen via ntg-context wrote: On 2/5/2023 12:32 PM, Pablo Rodriguez via ntg-context wrote: [...] Are we missing something or is this a bug? what do you expect as result? (maybe try \righthyphenmin=1) Line

Re: [NTG-context] Bug in verbatim wrapping examples on wiki

2023-02-05 Thread Pablo Rodriguez via ntg-context
On 2/5/23 13:13, Hans Hagen via ntg-context wrote: > On 2/5/2023 12:32 PM, Pablo Rodriguez via ntg-context wrote: >> [...] >> Are we missing something or is this a bug? > what do you expect as result? (maybe try \righthyphenmin=1) Line breaks are removing characters. In the sample below, output

Re: [NTG-context] Bug in verbatim wrapping examples on wiki

2023-02-05 Thread Hans Hagen via ntg-context
On 2/5/2023 12:32 PM, Pablo Rodriguez via ntg-context wrote: On 2/4/23 10:37, Pablo Rodriguez via ntg-context wrote: On 2/4/23 07:49, Hugo Landau via ntg-context wrote: On this page of the wiki there is an example for wrapping long words, like long hexadecimal strings:

Re: [NTG-context] Bug in verbatim wrapping examples on wiki

2023-02-05 Thread Floris van Manen via ntg-context
On 05/02/2023 12:32, Pablo Rodriguez via ntg-context wrote: Are we missing something or is this a bug? If you add a \tt at the beginning, the lines have different length. not sure why, but there is a reason to it... \startTEXpage[offset=3em] \tt \setupalign[tolerant,stretch] \dorecurse

Re: [NTG-context] Bug in verbatim wrapping examples on wiki

2023-02-05 Thread Pablo Rodriguez via ntg-context
On 2/4/23 10:37, Pablo Rodriguez via ntg-context wrote: > On 2/4/23 07:49, Hugo Landau via ntg-context wrote: >> On this page of the wiki there is an example for wrapping long words, >> like long hexadecimal strings: >> >> https://wiki.contextgarden.net/Wrapping >> >> This example is buggy because

Re: [NTG-context] Bug in verbatim wrapping examples on wiki

2023-02-04 Thread Pablo Rodriguez via ntg-context
On 2/4/23 07:49, Hugo Landau via ntg-context wrote: > On this page of the wiki there is an example for wrapping long words, > like long hexadecimal strings: > > https://wiki.contextgarden.net/Wrapping > > This example is buggy because it deletes one character at the point that > it is wrapped. >

[NTG-context] Bug in verbatim wrapping examples on wiki

2023-02-03 Thread Hugo Landau via ntg-context
On this page of the wiki there is an example for wrapping long words, like long hexadecimal strings: https://wiki.contextgarden.net/Wrapping This example is buggy because it deletes one character at the point that it is wrapped. In the example given, running context turns '257a410' into

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-30 Thread Ulrike Fischer via ntg-context
Am Sat, 28 Jan 2023 03:01:24 +0100 schrieb Kalouguine Andre via ntg-context: > I'm trying to make a verbatim block of text with copiable leading spaces > so that students can just copy my Python code snippets into their IDE. This basically doesn't work (quite unrelated to the tex code). T

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-30 Thread Pablo Rodriguez via ntg-context
On 1/29/23 17:58, Kalouguine Andre via ntg-context wrote: > On 28.01.2023 22:54, Hans Hagen via ntg-context wrote: >> […] >> so: this is all very viewer dependent! (The suggested comment method >> is more reliable.) >   > Unfortunately as I just found out, comments are also viewer dependent... >

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-29 Thread Kalouguine Andre via ntg-context
Acrobat). Right you are, it works with > your method, thanks! > I think the students have Evince so perhaps it's the best solution in the > absence there are some provisions for spaces in text but for verbatim it is a bit more tricky \setuptyping[space=on] you now see visual spaces show up tha

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-28 Thread Hans Hagen via ntg-context
solution in the absence there are some provisions for spaces in text but for verbatim it is a bit more tricky \setuptyping[space=on] you now see visual spaces show up that can be copied now, say that we add real spaces, which you can do after and this (in cont-new.mkxl): \unprotect

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-28 Thread Kalouguine Andre via ntg-context
ence of copiable spaces in verbatim mode. Thanks again! Best regards, Andre___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mail

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-28 Thread Pablo Rodriguez via ntg-context
On 1/28/23 14:31, Kalouguine Andre via ntg-context wrote: > Hi Pablo, Hi André, > [...]   > That's actually something I had never thought of, using PDF comments, > thanks!. When I faced a similar task, I thought it could be the way of solving the issue (how to copy and paste ConTeXt code and

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-28 Thread Kalouguine Andre via ntg-context
Hi Pablo, > \showframe > \setupinteraction[state=start] > \starttext > \startbuffer[abc] > def foo(x): > if x == 0: > bar() > else: > baz(x) > foo(x - 1) > \stopbuffer > \comment[location=leftmargin, > space=yes, > buffer=abc, > title={Python code}] > {}\typebuffer[abc] > \stoptext > > This

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-28 Thread Pablo Rodriguez via ntg-context
On 1/28/23 03:01, Kalouguine Andre via ntg-context wrote: > Good day to everyone, > > I'm trying to make a verbatim block of text with copiable leading spaces > so that students can just copy my Python code snippets into their IDE. Hi André, I wonder whether I’m gettin

[NTG-context] Subject: Leading spaces verbatim

2023-01-27 Thread Kalouguine Andre via ntg-context
Good day to everyone, I'm trying to make a verbatim block of text with copiable leading spaces so that students can just copy my Python code snippets into their IDE. I believe the question has been asked before (though I confess I can't find the right search terms to find the answer again). I

Re: [NTG-context] Xml filtering in Lua

2022-11-20 Thread Thomas A. Schmitz via ntg-context
However, whatever I try, I get the serialized xml typeset, with all verbatim, instead of processed. Here's what I've tried: \startxmlsetups xml:chapter:example \xmlfirst {#1} {.} \par \stopxmlsetups lxml.command (current_example, ".", "xml:chapter:example") or xml.spr

Re: [NTG-context] String substitution using regular expressions and backreferences

2022-08-26 Thread Hans Hagen via ntg-context
to text, which means that it is no longer possible to "flush" the XML for further processing as XML. The result is that any unresolved XML tags are written verbatim to the PDF: https://i.stack.imgur.com/9ZFND.png There are two other issues with this approach. First is efficien

Re: [NTG-context] String substitution using regular expressions and backreferences

2022-08-25 Thread Thangalin via ntg-context
flush" the XML for further processing as XML. The result is that any unresolved XML tags are written verbatim to the PDF: https://i.stack.imgur.com/9ZFND.png There are two other issues with this approach. First is efficiency. Second is that the processing function would have to be called for

Re: [NTG-context] How to do code listings & sections from XML (AsciiDoc)

2022-08-13 Thread Mojca Miklavec via ntg-context
On Fri, 12 Aug 2022 at 23:20, Aditya Mahajan wrote: > On Fri, 12 Aug 2022, Mojca Miklavec via ntg-context wrote: > > > (a) I don't know how to turn program listing (verbatim code) from xml > > to (perhaps, vim-based) syntax highlighting (but most importantly, to > > make su

Re: [NTG-context] How to do code listings & sections from XML (AsciiDoc)

2022-08-13 Thread Mojca Miklavec via ntg-context
issues: > > > > (a) I don't know how to turn program listing (verbatim code) from xml > > to (perhaps, vim-based) syntax highlighting (but most importantly, to > > make sure that line breaks work properly) > > Does something like this work: > > https://wiki.con

Re: [NTG-context] How to do code listings & sections from XML (AsciiDoc)

2022-08-12 Thread Max Chernoff via ntg-context
> Hi, > > Hans helped me out with some asciidoc processing a while ago. > > I played a bit further, but I'm currently facing two minor issues: > > (a) I don't know how to turn program listing (verbatim code) from xml > to (perhaps, vim-based) syntax highlighting (but mos

Re: [NTG-context] How to do code listings & sections from XML (AsciiDoc)

2022-08-12 Thread Aditya Mahajan via ntg-context
On Fri, 12 Aug 2022, Mojca Miklavec via ntg-context wrote: > Hi, > > Hans helped me out with some asciidoc processing a while ago. > > I played a bit further, but I'm currently facing two minor issues: > > (a) I don't know how to turn program listing (verbatim code) from x

[NTG-context] How to do code listings & sections from XML (AsciiDoc)

2022-08-12 Thread Mojca Miklavec via ntg-context
Hi, Hans helped me out with some asciidoc processing a while ago. I played a bit further, but I'm currently facing two minor issues: (a) I don't know how to turn program listing (verbatim code) from xml to (perhaps, vim-based) syntax highlighting (but most importantly, to make sure that line

Re: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Hans Hagen via ntg-context
with this (context speak): \def\textbf#1{\type{}#1\type{}} so, you define all the commands that you use (normally a subset of what a macro package provides, you just ignore what doesn't make sense) then you define a very large page (say A1) that you use completely then you typeset the document in verbatim

Re: [NTG-context] Verbatim text in a frame

2021-07-31 Thread Wolfgang Schuster via ntg-context
Hans Hagen via ntg-context schrieb am 31.07.2021 um 00:18: On 7/30/2021 9:12 PM, Jeroen via ntg-context wrote: I am using the following preamble to put a frame around verbatim text. How can I have all the text start some 5pt from the frame and how can I get rounded corners, corner=0 does

Re: [NTG-context] Verbatim text in a frame

2021-07-30 Thread Hans Hagen via ntg-context
On 7/30/2021 9:12 PM, Jeroen via ntg-context wrote: I am using the following preamble to put a frame around verbatim text. How can I have all the text start some 5pt from the frame and how can I get rounded corners, corner=0 does not seem to work \setupcolors[state=start] \setupcolor[xwi

[NTG-context] Verbatim text in a frame

2021-07-30 Thread Jeroen via ntg-context
I am using the following preamble to put a frame around verbatim text. How can I have all the text start some 5pt from the frame and how can I get rounded corners, corner=0 does not seem to work \setupcolors[state=start] \setupcolor[xwi] \definetextbackground [Code] [frame

Re: [NTG-context] t-vim module: no highlighting for custom filetypes

2021-05-23 Thread Aditya Mahajan
- is typeset as > > > > an en-dash in LMTX (but not in MKIV, as documented). Could you look into > > > > that? > > > > > > best is that the module uses: > > > > > > \the\everyinitializeverbatim > > > > > > because there we

Re: [NTG-context] t-vim module: no highlighting for custom filetypes

2021-05-23 Thread Hans Hagen
is that the module uses: \the\everyinitializeverbatim because there we disable all kind of non verbatim stuff Thanks. It took a few trial and error that \the\everyinitializeverbatim must come after \usealignparameter. However, using \nohypencollapsing after \usealignparameter means that I cannot get

Re: [NTG-context] t-vim module: no highlighting for custom filetypes

2021-05-22 Thread Aditya Mahajan
est is that the module uses: > > \the\everyinitializeverbatim > > because there we disable all kind of non verbatim stuff Thanks. It took a few trial and error that \the\everyinitializeverbatim must come after \usealignparameter. However, using \nohypencollapsing after \usealignparameter means that

Re: [NTG-context] t-vim module: no highlighting for custom filetypes

2021-05-22 Thread Hans Hagen
look into that? best is that the module uses: \the\everyinitializeverbatim because there we disable all kind of non verbatim stuff Hans - Hans Hagen | PRAGMA ADE Ridderstraat

Re: [NTG-context] [formatting verbatim text]

2021-04-26 Thread Hans Hagen
On 4/26/2021 12:23 PM, Floris van Manen wrote: \starttext \starttyping[escape=@]  1   137  26  25 >    1  69  32  2   @btex@bgroup@red@bf 137 @egroup@etex  26  25 >    1  69  32  3   @btex@bgroup@red@bf 137 @egroup@etex  26  25 >    1  69  32  4   137  26  25 >    1  69  32  5  

Re: [NTG-context] [formatting verbatim text]

2021-04-26 Thread Floris van Manen
Aparently all spaces after @etex get reduced to one only. I'd expect that to happen inside @btex and @etex \starttext \starttyping[escape=@] 1 137 26 25 >1 69 32 2 @btex@bgroup@red@bf 137 @egroup@etex 26 25 >1 69 32 3 @btex@bgroup@red@bf 137 @egroup@etex 26 25

Re: [NTG-context] [formatting verbatim text]

2021-04-26 Thread Floris van Manen
On 26/04/2021 10:59, Hans Hagen wrote: \starttext \starttyping[escape=/] one two three four /btex/bgroup/red five /egroup/etex six seven eight nine \stoptyping \stoptext That works indeed! Thanks. Are there restriction on what context commands can be given inside the bgroup? e.g. I tried

Re: [NTG-context] [formatting verbatim text]

2021-04-26 Thread Hans Hagen
On 4/26/2021 10:25 AM, Floris van Manen wrote: What is the easiest way, if possible, to highlight some sections of verbatim text? given: \starttyping one two three four five six seven eight nine \stoptyping i'd like to color the word 'five' in red, or italic. \starttext \starttyping[escape

[NTG-context] [formatting verbatim text]

2021-04-26 Thread Floris van Manen
What is the easiest way, if possible, to highlight some sections of verbatim text? given: \starttyping one two three four five six seven eight nine \stoptyping i'd like to color the word 'five' in red, or italic. .Floris

Re: [NTG-context] How to write readable source files?

2021-04-24 Thread Hans Hagen
spaces and empty lines often matter if you use the scite lexer (in verbatim) you also get an idea how I see the source Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061

[NTG-context] next upload

2021-04-21 Thread Hans Hagen
in the process of enhancing that, this traditional -- and --- replacement now kicks in before hyphenation. It can be disabled by \nohyphencollapsing, which actually happens in for instance verbatim and it can be applied locally if needed. There might be places where you expect this to happen so let

Re: [NTG-context] Parallelizing typesetting of large documents with lots of cross-references

2020-12-03 Thread Hans Hagen
On 12/3/2020 12:04 PM, Stephen Gaito wrote: - very large (1,000+ pages), not that large, literate code is often verbatim so that doesn't take much runtime either - highly cross-referenced documents, ok, that demands runs - with embedded literate-programmed code (which needs

Re: [NTG-context] \type{...} as macro argument

2020-11-08 Thread Sylvain Hubert
orecurse, such that \dorecurse{10}{\type{ab c}} > > does not squash the spaces? > > Verbatim in arguments of other commands is tricky because in case with > \dorecurse the loop reads the content before it is passed to type, as a > result of this process all spaces are collapsed.

Re: [NTG-context] \type{...} as macro argument

2020-11-08 Thread Wolfgang Schuster
Sylvain Hubert schrieb am 08.11.2020 um 17:56: Hi Wolfgang, I'm sorry that the question was not clear enough. Let me ask in this way: how to define a \dorecurse, such that \dorecurse{10}{\type{a    b c}} does not squash the spaces? Verbatim in arguments of other commands is tricky because

Re: [NTG-context] MKIV - LMTX difference: stripping of leading white space in verbatim text

2020-09-03 Thread Christoph Reller
arttext > > \startLUA > > whatever > > \stopLUA > > \stoptext > > > > In contrast to ConTeXt MKIV, the leading four spaces in front of > > "whatever" are not removed when processing the verbatim text: > > > > MKIV output: >

Re: [NTG-context] MKIV - LMTX difference: stripping of leading white space in verbatim text

2020-09-02 Thread Wolfgang Schuster
processing the verbatim text: MKIV output: whatever LMTX output:     whatever Is there a way to get the old MKIV behavior back? \setuptyping[LUA][strip=yes] Wolfgang ___ If your question is of interest to othe

[NTG-context] MKIV - LMTX difference: stripping of leading white space in verbatim text

2020-09-02 Thread Christoph Reller
Dear List, I am using ConTeXt LMTX 2018.05.19 21:46. Consider the following MWE: \starttext \startLUA whatever \stopLUA \stoptext In contrast to ConTeXt MKIV, the leading four spaces in front of "whatever" are not removed when processing the verbatim text: MKIV output: what

Re: [NTG-context] Verbatim typing and compound breakpoints

2020-09-01 Thread Christoph Reller
On Tue, Sep 1, 2020 at 10:50 AM Christoph Reller wrote: > I am using ConTeXt LMTX 2020.08.28 13:58 with the following M(N)WE: > > \definetype[typeLUA][option=LUA] > \setbreakpoints[compound] > \starttext > \typeLUA{function(argument)} > \stoptext > > Sadly, it does not compile. > I found that

[NTG-context] Verbatim typing and compound breakpoints

2020-09-01 Thread Christoph Reller
Dear List, I am using ConTeXt LMTX 2020.08.28 13:58 with the following M(N)WE: \definetype[typeLUA][option=LUA] \setbreakpoints[compound] \starttext \typeLUA{function(argument)} \stoptext Sadly, it does not compile. The problem seems to be the simultaneous use of compound breakpoints and

Re: [NTG-context] Using \applytosplitstringwordspaced and allies

2020-08-09 Thread Jairo A. del Rio
ups or ignores macros AND prints braces "{" > > and "}" as if it were in verbatim mode depending on the content being > > on the document or loaded via Lua, even when context.escape is used. > > How to keep {\it braced content}? Thank you in advance. > > Are you trying to types

Re: [NTG-context] Using \applytosplitstringwordspaced and allies

2020-08-09 Thread Wolfgang Schuster
Jairo A. del Rio schrieb am 08.08.2020 um 16:31: Thank you very much! Something else happens: \applytosplitstringwordspaced\somemacro{Content and {\tt typewriter} more content} either ignores braced groups or ignores macros AND prints braces "{" and "}" as if it w

Re: [NTG-context] Using \applytosplitstringwordspaced and allies

2020-08-08 Thread Jairo A. del Rio
Thank you very much! Something else happens: \applytosplitstringwordspaced\somemacro{Content and {\tt typewriter} more content} either ignores braced groups or ignores macros AND prints braces "{" and "}" as if it were in verbatim mode depending on the content being on the do

[NTG-context] french translation of ConTeXt interface - progress (v3)

2020-07-14 Thread Garulfo
0% tables 1033231% verbatim 221777% whitespace 1073028% xml 155 9 6% 6293 236638% ___ If your question is of interest to othe

Re: [NTG-context] xhtml export internal command \dostarttaging modify display and other XML/XHTML attributes

2020-04-10 Thread Christoph Hintermüller
iple output for > publishing > ane educational purposes. And it looks pretty good too. > Thank you very much i will do. You are refering to Thomas Schmitz? \setupbackend[ export=yes, xhtml=yes ] \setupexport[ title={linenumber placement missmatch example in export}, subtitle={}, au

Re: [NTG-context] xhtml export internal command \dostarttaging modify display and other XML/XHTML attributes

2020-04-10 Thread Hans Hagen
attributes the corresponding tags should receive. Second i noticed that even in verbatim the line numbers are not on the line they number but are, due to late injections printed on an empty line in xhtml. Needs improvement here too. All the above and some more forces me to push my plans to publish my

Re: [NTG-context] xhtml export internal command \dostarttaging modify display and other XML/XHTML attributes

2020-04-10 Thread Thomas A. Schmitz
ding tags > should receive. > > Second i noticed that even in verbatim the line numbers are not on the > line they number but are, due to late injections printed on an empty > line in xhtml. Needs improvement here too. > > > All the above and some more forces me to p

Re: [NTG-context] xhtml export internal command \dostarttaging modify display and other XML/XHTML attributes

2020-04-10 Thread Christoph Hintermüller
end exporter. Please increase the USB of ConTeXt by improoving the xml/xhtml exporter backend by allowing modules to hook into it, defining how the contotent should be processed and what css attributes the corresponding tags should receive. Second i noticed that even in verbatim the line numbers a

Re: [NTG-context] ntg-context Digest, Vol 189, Issue 28

2020-03-15 Thread Yves Cloutier
Subject: [NTG-context] Source Code with Bolded Keywords > Message-ID: > j5f28-8qv3ykrp+ev+ukrf0q+sp3mabskapxbkvn956...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello, > > I am trying to typeset source code for a custom progr

Re: [NTG-context] Source Code with Bolded Keywords

2020-03-14 Thread Wolfgang Schuster
Yves Cloutier schrieb am 14.03.2020 um 16:54: Hello, I am trying to typeset source code for a custom programming language and would like to have the keywords in bold text. I tried following the example found here regarding verbatim displays: https://www.contextgarden.net/Verbatim_text

[NTG-context] Source Code with Bolded Keywords

2020-03-14 Thread Yves Cloutier
Hello, I am trying to typeset source code for a custom programming language and would like to have the keywords in bold text. I tried following the example found here regarding verbatim displays: https://www.contextgarden.net/Verbatim_text#Displayed_text Specifically the C example, however

Re: [NTG-context] Syntax hightlighting

2019-08-28 Thread Hans Hagen
On 8/28/2019 8:14 PM, Fabrice L wrote: Dear list, I’m using colored verbatim code (for course notes). In the past, I modified verb-mp.mkii for the langage I need (SAS). This code works fine with MKII: %—— \setupcolors[state=start] \definetyping [MP] [option=MP] \starttext A example

[NTG-context] Syntax hightlighting

2019-08-28 Thread Fabrice L
Dear list, I’m using colored verbatim code (for course notes). In the past, I modified verb-mp.mkii for the langage I need (SAS). This code works fine with MKII: %—— \setupcolors[state=start] \definetyping [MP] [option=MP] \starttext A example: \startMP draw (0,0) withpen pencircle 1in

Re: [NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-01-31 Thread Weber, Matthias
tion >> passing between lua and ConTeXt has me confused and tangled in a knot. >> Below is a minimal almost-working example. The issue is in the line >> {\ctxlua{userdata.addTempToBuffer('#1', [==[\getnumber[problem]]==])}} >> which ends up putting the verbatim

Re: [NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-01-31 Thread Wolfgang Schuster
ng to work. The delayed evaluation and information passing between lua and ConTeXt has me confused and tangled in a knot. Below is a minimal almost-working example. The issue is in the line {\ctxlua{userdata.addTempToBuffer('#1', [==[\getnumber[problem]]==])}} which ends up putting the verba

  1   2   3   4   5   6   7   8   >